<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/template/template_dialog.xhtml"
	xmlns:s="http://sduept.security.el/func">
	<ui:define name="head">
		<link rel="stylesheet" href="/resources/plugins/datatables/dataTables.bootstrap.css" />
		<title>模板详情查看</title>
		<style>
		
</style>

<!-- 
<p:commandButton value="查看详情" icon="ui-icon-gear" style="margin-left:5px"
	onclick="MyModal.showModal('/ui/common/assessmentTemplate_detail_lookup.xhtml?templateId=模板的id',1300,800,'模板详情')"/>
 -->
 
	</ui:define>
	<ui:define name="content">
		<div class="col-xs-12">
			<div class="col-md-4">
				<div class="box box-primary">
					<div class="box-header with-border">
						<h3 class="box-title">模板列表</h3>
					</div>
					<div class="box-body chart">
						<h:form id="treeForm">
							<p:tree value="#{assessmentTemplateDetailController.templateRoot}" var="node"
								dynamic="true" id="tree" widgetVar="tree" animate="true"
								selectionMode="single" style="border:0">
								<p:ajax event="expand" update="tree" listener="#{assessmentTemplateDetailController.onNodeExpand}" />
								<p:ajax event="select" listener="#{assessmentTemplateDetailController.onNodeSelect}" update=":detailForm:plist" />
								<p:treeNode type="template" icon="fa fa-file-word-o">
									<h:outputText value="#{node}" />
								</p:treeNode>
								<p:treeNode type="templateItem" icon="fa fa-file-text-o">
									<h:outputText value="#{node}" />
								</p:treeNode>
							</p:tree>
						</h:form>
					</div>
				</div>
			</div>
			<div class="col-md-8">
				<div class="box box-primary">
					<div class="box-header with-border">
						<h3 class="box-title">模板详情</h3>
					</div>
					<div class="box-body chart">
						<h:form id="detailForm">
							<s:dataTable id="plist" value="#{assessmentTemplateDetailController.templateDetails}"
								var="item" sortBy="#{item.projectNo}"
								emptyMessage="无记录" style="text-align:center" >
								<p:headerRow>
									<p:column colspan="3">
										<h:outputText value="#{item.projectNo}、#{item.projectName}" />
									</p:column>
								</p:headerRow>
								<s:column headerText="评价项目" groupRow="true" 
									style="width:20%">
									<h:outputText value="#{item.itemNo}.#{item.itemName}" />
								</s:column>
								<s:column headerText="检查要素及要求" groupRow="true" 
									style="width:25%">
									<h:outputText value="#{item.inspectionNo}.#{item.inspectionName}" />
								</s:column>
								<s:column headerText="评分标准" style="width:50%;text-align:left">
									<h:outputText value="#{item.scoreNo}.#{item.scoreName}" />
								</s:column>
							</s:dataTable>
						</h:form>
					</div>
				</div>
			</div>
		</div>
	</ui:define>
</ui:composition>
